var e = require("@/utils/jump"),
  t = i(require("@/config/page")),
  a = i(require("@/config/index"));
function i(e) {
  return e && e.__esModule ? e : { default: e };
}
Component({
  properties: {
    time: { type: Number, default: 3 },
    isShowOpenScreen: { type: Boolean, default: !1 },
    info: { type: Object, default: {} },
  },
  data: { CDN: a.default.CDN, opacity: 1, time: 1, isShowBtn: !0 },
  methods: {
    goDetail: function () {
      var a = this.data.info;
      if (a && a.content) {
        var i = a.category,
          n = a.content,
          o = a.title;
        switch (i) {
          case 0:
            break;
          case 1:
            (0, e.navigateTo)(
              t.default.PAGE_APPRECIATION_PAGES_CULTURAL_INDEX,
              { id: n },
            );
            break;
          case 2:
            (0, e.navigateTo)(t.default.PAGE_RECOMMEND_EXHIBITION_CARD, {
              id: n,
            });
            break;
          case 3:
            (0, e.navigateTo)(t.default.PAGE_TOUR_LOCATION_DETAILS, { id: n });
            break;
          case 4:
            (0, e.navigateTo)(t.default.PAGE_WEBVIEW, { webUrl: n, title: o });
        }
      }
    },
    onClose: function () {
      this.triggerEvent("onClose", {});
    },
    onTimeUpdate: function (e) {
      var t = e.detail,
        a = t.currentTime,
        i = t.duration - a;
      i < 1.8 &&
        1 === this.data.opacity &&
        this.setData({ opacity: 0, time: i }),
        i <= 1 && this.setData({ isShowBtn: !1 });
    },
  },
});
